<script setup lang="ts">

//2.定义属性，并接收父组件传值
defineProps<{ car: string; money:number}>()
</script>

<template>
  <div class="button">
    子组件
    <!-- 4.调用 -->
    <div>车：{{ car }}</div>
    <div>钱包：{{ money }}</div>
  </div>
</template>

<style lang="css" scoped>
.button{
    width: 300px;
    height: 200px;
    background-color: greenyellow;
}
</style>
